package com.chief.dubboFeign.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product", excludeProperty = "age")
public class ProductEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    private int id;

    private int age;

    @TableField("name")
    private String name;

    @TableField("sex")
    private SexEnum sex;

    @TableLogic(value = "0", delval = "1")
    private int del;

    @Override
    public String toString() {
        return "ProductEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex=" + sex.getName() +
                ", del=" + del +
                '}';
    }
}
